<?php
require_once("../../Config.php");
require_once("../../Class/ClassResult.php");

header("Content-Type:application/json; charset=utf-8");

// 检查是否已经登陆过
session_start();
if(isset($_SESSION["name"])) {
    exit(Result::jsonReturn(0, "已登录", array(
        "id"=>$_SESSION["id"],
        "name"=>$_SESSION["name"], 
        "email"=>$_SESSION["email"], 
        "power"=>$_SESSION["power"])));
}else {
    exit(Result::jsonReturn(1, "未登录"));
}


?>